package com.morgankelly.service;

import java.util.List;

import com.morgankelly.po.Blog;
import com.morgankelly.po.BlogComment;
import com.morgankelly.po.Category;
import com.morgankelly.po.Tag;

public interface BlogService {
	
	List<Category> getCategoryList();
	List<Blog> getBlogList();
	List<BlogComment> getBlogCommentList();
	List<Tag> getTagList();
	
	void addCategory(Category category);
	void addBlog(Blog blog);
	void addBlogComment(BlogComment blogComment);
	void addTag(Tag tag);
	
	Category getCategoryByID(Long id);
	Blog getBlogByID(Long id);
	BlogComment getBlogCommentByID(Long id);
	Tag getTagByID(Long id);
	
	void deleteCategoryByID(Long id);
	void deleteBlogByID(Long id);
	void deleteBlogCommentByID(Long id);
	void deleteTagByID(Long id);
	
	int getBlogNumByCategoryID(Long id);
	List<Blog> getBlogListBySearchKey(String searchKey);
	int getCommentNumByBlogID(Long id);
	
	void updateCategory(Long id, String name, String description);
	void updateBlog(Long id, String title, String content, Long accountID, Long categoryID);
	void updateBlogComment(Long id);
	void updateTag(Long id, String name);
	
}
